<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateHomeBannersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('home_banners', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('title')->default('')->comment('标题');
            $table->text('description')->nullable()->comment('描述');
            $table->integer('image_id')->default('0')->nullable()->comment('图标');
            $table->integer('jump_type')->default('0')->nullable()->comment('跳转类型');
            $table->string('link')->nullable()->comment('转接地址');
            $table->string('appid')->nullable()->comment('小程序AppID');
            $table->string('mini_path')->nullable()->comment('小程序地址');
            $table->integer('status')->default('0')->nullable()->comment('状态');
            $table->integer('creator_id')->default('0')->nullable()->comment('创建人');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('home_banners');
    }
}
